data: "The Dickens tool creates digital books that can be read using the Newton Book Reader built into the Newton ROM. Dickens uses the XTND translator system to take a word processor document with text and pictures and view system templates (which Dickens refers to as \u201c" & "forms\u201d" & ") and lays it out sequentially on pages. Although Dickens uses the fonts from the source, it makes its own decisions about flowing text and placing information to commands you mark up the text with. These commands (referred to as dot comma"&"nds because of the \".\" that proceeds them) describe the document itself, each of the chapters or sections of the document, as well as individual stories and page layouts. The document is then opened with Dickens, which will create a book file which NTK compiles (along with any templates it may use) into a Newton book. This book can be then reviewed with Newton, and changes made by going back to the original marked-up document and reprocessing with Dickens and NTK.
",
viewFont: s2,
layout: 8192
};
book.contents[24] := c25;
c26 := {
data: "Layout Issues",
viewFont: s8,
name: "layout"
};
book.contents[25] := c26;
c27 := {
data: "On future machines, pages may automatically reformat to take advantage of a larger screen size. Thus, if a title ends up on the bottom of a page, and the related story on the next page, you’re better off using the KeepWith flag on the story, rather than StartsPage flag on the title (flags are explained below). Both may give the same appearance on the smaller screens, but the latter may cause an unnecessary pagination on future Newtons. This emphasis is important in scripting as well. You should never hard"&"-code page numbers, since layout might be different on a larger screen. Instead, use Content-related methods.
It’s helpful to set your word processor margins to 3.33 inches. This simulates the appearance on the Newton screen. Also don’t be concerned with screen margins. Although Dickens places text across the entire screen, on a Newton, there is \u201c" & "dead space\u201d" & " on all sides.
Top of page titles are always 16 pixels high. If you use this entire height or exceed it, the title will run into the page contents w"&"hich if done correctly, can be an attractive effect.
Do not hyphenate manually (by typing \u201c" & "- \u201d" & " where you want a line break). This may give the correct visual appearance on the MessagePad, but not on machines with larger screens. And it will prevent the user from searching for the word you hyphenated.
Try to use tabs, rather than spaces, to align columns. (However, the Newton doesn’t support right-aligned tabs.) You’ll save space in your book if you set as few tab stops as possible (or set them only in t"&"hose stories that need them). Note that any story can only have one tab ruler – the first paragraph’s being the one that gets used.
The Newton MessagePad has only New York and Geneva fonts (and only 9, 10, 12, 14, 18, 24, 48, etc.) If you want your book to lay out correctly, you’ll have to either use these fonts, or include your own with your book’s package. (The Newton also has a system font, but you should not use this because it is best for system elements like buttons and menus and does not print wel"&"l.)
Special styles such as \u201c" & "small caps\u201d" & " or \u201c" & "all caps\u201d" & " that some word processor programs offer are not supported. However characters such as curly quotes and em dash are supported.
The process of authoring a book is iterative. It’s hard to guess exactly where pages will fall. You’ll want to mark up your document, process it through Dickens, then proof it on a Newton.
Remember that text is treated the same for purposes of layout, regardless of it being tagged as a title or subject, or as a story.
data: "Any line beginning with a period \u201c" & ".\u201d" & " is treated as a Dickens command. ",
styles: [34, s2, 1, s11, 36, s2],
layout: 8192
};
book.contents[29] := c30;
c31 := {
data: "•",
viewFont: s2,
layout: 1
};
book.contents[30] := c31;
c32 := {
data: "Comments can be added to a command line by preceding the comment with #. ",
styles: [70, s2, 1, s11, 3, s2],
layout: 8192
};
book.contents[31] := c32;
c33 := {
data: "•",
viewFont: s2,
layout: 1
};
book.contents[32] := c33;
c34 := {
data: "The backslash character \u201c" & "\\\u201d" & " is the escape character: if it is the first character on a line, it will be ignored, and the rest of the line taken as is. If it is the last character on a command line, the command will be continued to the next line. ",
styles: [26, s2, 1, s11, 223, s2],
layout: 8192
};
book.contents[33] := c34;
c35 := {
data: "•",
viewFont: s2,
layout: 1
};
book.contents[34] := c35;
c36 := {
data: "Commands and keywords are not case-sensitive. ",
viewFont: s2,
layout: 8192
};
book.contents[35] := c36;
c37 := {
data: "•",
viewFont: s2,
layout: 1
};
book.contents[36] := c37;
c38 := {
data: "Parameters shown in square brackets \u201c" & "[]\u201d" & " are optional. ",
styles: [35, s2, 1, s11, 1, s2, 2, s11, 17, s2],
layout: 8192
};
book.contents[37] := c38;
c39 := {
data: "•",
viewFont: s2,
layout: 1
};
book.contents[38] := c39;
c40 := {
data: "Names containing spaces (e.g. \"Futura Heavy\") must be enclosed in quote marks.
",
viewFont: s2,
layout: 8192
};
book.contents[39] := c40;
c41 := {
data: "Style",
styles: [5, s8, 1, s12],
name: "style"
};
book.contents[40] := c41;
c42 := {
data: "Document commands will generally be at the beginning, followed by any definitions of page layouts or styles. The bulk of the document is the original text, interspersed with commands that indicate the document’s structure. Note that not all commands are required; this is especially true for document commands.
",
styles: [312, s2, 1, s1],
layout: 8192
};
book.contents[41] := c42;
c43 := {
data: "Command Categories",
viewFont: s8,
layout: 3,
name: "commands"
};
book.contents[42] := c43;
c44 := {
data: "There are five different categories of commands:",
data: "Define a template to used with the Newton’s Intelligent Assistant. All lines until the .endassist are taken as NewtonScript defining the task template or more commonly a reference to a task template defined in project data. The task templates are installed automatically by the book reader when a book is loaded on the Newton and removed when the book is removed. This command is repeated for each task template. (optional)
data: "Terminates a block of NewtonScript defining a IA task template (begun with .assist).
",
styles: [75, s2, 7, s10, 4, s2],
layout: 8192
};
book.contents[58] := c59;
c60 := {
data: " .author author",
styles: [8, s10, 1, s5, 6, s14, 1, s2],
layout: 3
};
book.contents[59] := c60;
c61 := {
data: "Define the book’s authors. (optional)
.author Charles Dickens
",
styles: [40, s2, 25, s9, 1, s2],
layout: 8192
};
book.contents[60] := c61;
c62 := {
data: " .blurb",
styles: [1, s2, 6, s10, 1, s2],
layout: 3
};
book.contents[61] := c62;
c63 := {
data: "The blurb contains text about the book. May be used for sales orientated information. The text begins on the line following the command and continues until the next dot command. (optional)
.blurb
This is a great book that tells all about the life and times of that great author Charles Dickens. Please buy me!
",
styles: [190, s2, 124, s9, 1, s2],
layout: 8192
};
book.contents[62] := c63;
c64 := {
data: " .copyright copyright",
styles: [1, s5, 10, s10, 1, s5, 9, s14, 1, s5],
layout: 3
};
book.contents[63] := c64;
c65 := {
data: "Define the current book’s copyright notice. There can only be one such command. (optional)
.copyright (c) 1993 Apple Computer, Inc.
",
styles: [93, s2, 42, s9, 1, s2],
layout: 8192
};
book.contents[64] := c65;
c66 := {
data: " .expires date",
styles: [2, s5, 7, s10, 1, s5, 4, s14, 1, s5],
layout: 3
};
book.contents[65] := c66;
c67 := {
data: "Defines the date on which the information contained in this book is no longer valid. There can only be one such command. (optional)
.expires July 7, 1993
",
styles: [133, s2, 23, s9, 1, s2],
layout: 8192
};
book.contents[66] := c67;
c68 := {
data: " .isbn isbn",
styles: [2, s5, 4, s10, 1, s5, 4, s14, 1, s5],
layout: 3
};
book.contents[67] := c68;
c69 := {
data: "Defines the current book’s ISBN. The ISBN is used to uniquely identify the book between installations. Note that the ISBN should be no more than 15 characters. If you don’t have an ISBN, make up some unique 15-character string. There can only be one such command. (required)
.isbn 0-316-08275-9
",
styles: [276, s2, 21, s9, 1, s2],
layout: 8192
};
book.contents[68] := c69;
c70 := {
data: " .date date",
styles: [1, s5, 5, s10, 1, s5, 4, s14, 1, s5],
layout: 3
};
book.contents[69] := c70;
c71 := {
data: "Define the publication date of the book. There can only be one such command. (optional)
.date July 11, 1994
",
styles: [89, s2, 21, s9, 1, s2],
layout: 8192
};
book.contents[70] := c71;
c72 := {
data: " .key keyword1 keyword2 ...",
styles: [1, s5, 4, s10, 1, s5, 21, s14, 1, s5],
layout: 3
};
book.contents[71] := c72;
c73 := {
data: "Define a list of keywords which describe the book to readers. These keywords can be searched on and are remembered by a future book reader even when a book (card) has been removed. There can only be one such command. (optional)
.key biography author dickens England writer novelist
",
styles: [229, s2, 55, s9, 1, s2],
layout: 8192
};
book.contents[72] := c73;
c74 := {
data: " .publisher publisher",
styles: [1, s5, 10, s10, 1, s5, 9, s14, 1, s5],
layout: 3
};
book.contents[73] := c74;
c75 := {
data: "Define the current book’s publisher. There can only be one such command. (optional)
.publisher Apple Computer, Inc.
",
styles: [85, s2, 33, s9, 1, s2],
layout: 8192
};
book.contents[74] := c75;
c76 := {
data: " .shortTitle title",
styles: [1, s5, 11, s10, 1, s5, 5, s14, 1, s5],
layout: 3
};
book.contents[75] := c76;
c77 := {
data: "Define the book’s short title which is used for its name in the Extras drawer. There can only be one such command (optional).
.shorttitle Dickens
",
styles: [128, s2, 21, s9, 1, s2],
layout: 8192
};
book.contents[76] := c77;
c78 := {
data: " .title title",
styles: [1, s5, 6, s10, 1, s5, 5, s14, 1, s5],
layout: 3
};
book.contents[77] := c78;
c79 := {
data: "Define the book’s title. There can only be one such command. (required)
.title All About Dickens
",
styles: [74, s2, 26, s9, 1, s2],
layout: 8192
};
book.contents[78] := c79;
c80 := {
data: "Content Commands",
viewFont: s13,
layout: 3,
name: "content_commands"
};
book.contents[79] := c80;
c81 := {
data: " .attribute name : value [, name : value ]",
data: "Allows additional information to be defined for each Content. This command results in a slot being created in the Content frame that can be used by scripts or by the intelligent assistant. For example a Content describing a place might want an attribute containing its telephone number or address.
data: "Reserves space for a form or view on the page. Following the form command is usually a reference to the proto template or layout defined in NTK. Name adds a slot of type 'name and data equal to the string. Note that the height and width are required and can be gotten by opening a browser on the particular view and looking at the viewBounds of the topmost view.
data: "Indicates a new named kiosk page (or menu page). Any content commands (story, picture, etc) following the .kiosk which specify a a place to turn to (with goto=), become buttons in the kiosk page. Any content commands without goto are simply labels or pictures. Note that all contents in kiosk take on the name of the kiosk.
.kiosk name=aKiosk layout=myKiosk
.story
Tap on a subject...
.story goto=subj1
Car Rental Companies
.story goto=subj2
Airlines
.endkiosk
Note: You should create a layout to be "&"used with kiosk pages. In this layout be sure to include the Kiosk flag. In this way Book Reader can automatically provide a means for your reader to return to the nearest kiosk via the bookmarks window.
data: "Ends a kiosk (begun with .kiosk). Required for kiosks.
",
styles: [25, s2, 6, s10, 25, s2],
layout: 8192
};
book.contents[89] := c90;
c91 := {
data: " .mark",
styles: [1, s5, 6, s10],
layout: 3
};
book.contents[90] := c91;
c92 := {
data: "Marks the current content for reference by a subsequent usemark. In this way one Content (a form for example) can quickly refer to another without having to search for it. For example you might want the attributes from one Content to be accessible to another. You can only have one Content marked at a time.
data: "Adds to the current content a slot named related which contains a reference to a content that was \u201c" & "marked\u201d" & " with the mark command.
data: "Specifies that the following PICT be used as a Content. A path to an external PICT file may also be specified. Name adds a slot of type 'name and data equal to the string. Goto specifies a content to turn to when the picture is tapped by the user. An optional width or height (in pixels) can be specified.
.picture \"myDisk:proj:portrait\" Centered
When Dickens lays out pages, it tries to give the maximum amount of space possible to pictures so users are not always forced to scroll. Often this means that p"&"ictures are placed on the next page instead of staying with a related subject or story. To avoid this the author can either use the KeepWith flag to keep the picture with the previous content or specify a smaller size for the picture using the width and height commands.
Note that you can’t mix text and graphics within the same Content.
data: "Attaches a NewtonScript to the current Content (the current content is any previous chapter, map, picture, story, etc). Scripts may also be entered at the beginning of the document (before any content or layout commands) in which case their scope will be global (referred to as book scripts) and also may be entered following a layout command (referred to as page scripts). Event is what triggers the script (the default is buttonClickScript, other examples might include viewDrawScript).
All lines until the"&" .endscript are taken as the script.
data: "Indicates a new Content within the previous \u201c" & "Subject.\u201d" & " The Content will be one level deeper. Parameters are the same as the .subject command. Name adds a slot of type 'name and data equal to the string. Goto specifies a content to turn to when this content is tapped by the user.
data: "Indicate a new Content at level (1 is a chapter, etc.). The following text or graphic is the current Content until the next defining command (chapter, map, picture, story, etc). Subject text will appear in the Browser. Name adds a slot of type 'name and data equal to the string. Goto specifies a content to turn to when this content is tapped by the user. See Page Layout Commands, below for details on the layout and styles options.
data: "Creates a new browser pane in the browser. Name is the name as it will appear in the browser menu and is also used to match with contents that have the browser= set. Type can be either list or form. If the type is form, following the command is a form definition that is the browser pane. ViewBounds must be limited to the size of the browser pane.
data: "Creates a named page layout with a number of columns whose widths are specified.
.layout twoColumn 6 6 Edges
Defines a page layout (which is referred to as \u201c" & "twoColumn\u201d" & ") with two equal main columns, with a box around it.
.layout annotated 4 Sidebar 8
Defines a page layout (which is named \u201c" & "annotated\u201d" & ") with two columns. The left column is four grid units or 1/3 of the page, and is a sidebar. The right column is 8 grid units or 2/3 the width of the page, and is the main column.
If a .script follows a"&" .layout command, the script is attached to the layout. In this manner a script can be used to handle the drawing of a special background or click event not handled by Content.
If a specific layout is not specified in a content command, the last defined one is used. Thus it’s a good idea to make your default layout, the last one you define.
data: "Assigns to the previous layout command a centered text header which will be displayed at the top of every page that uses the layout. The font and style specified are used.
",
viewFont: s2,
layout: 8192
};
book.contents[111] := c112;
c113 := {
data: " .pictheader",
viewFont: s11,
layout: 3
};
book.contents[112] := c113;
c114 := {
data: "Assigns to the previous layout command a picture header which will be displayed at the top of every page that uses the layout.
data: "Assigns to the previous layout command a content of type picture, story or form and automatically places that content on every page. The content can appear at the top of the page (below the header if applicable), and/or at the bottom of the page if the pageBottom flag is used. The content type is used the same way as its corresponding content command (.story, .picture, .form).
.layout full 12
.running form height=100 width=200 layout_CoolHead
",
styles: [354, s2, 23, s5, 4, s2, 69, s9, 1, s2],
layout: 8192
};
book.contents[115] := c116;
c117 := {
data: "Other Commands",
viewFont: s13,
layout: 3,
name: "other_commands"
};
book.contents[116] := c117;
c118 := {
data: " .# text",
styles: [3, s11, 1, s2, 4, s16, 1, s2],
layout: 8195
};
book.contents[117] := c118;
c119 := {
data: "Allows a comment line which does not appear in the output.
.# This is a comment
",
styles: [60, s2, 22, s9, 1, s2],
layout: 8192
};
book.contents[118] := c119;
c120 := {
data: " .chain \"filename \"",
styles: [7, s11, 2, s2, 9, s16, 2, s2],
layout: 3
};
book.contents[119] := c120;
c121 := {
data: "Chains the processing of the current file to another. The previous file is closed.
",
viewFont: s2,
layout: 8192
};
book.contents[120] := c121;
c122 := {
data: " .index word",
styles: [7, s11, 1, s2, 4, s16, 1, s2],
layout: 3
};
book.contents[121] := c122;
c123 := {
data: "Creates an alphabetic index and adds word to it. With each index entry is kept the content in which the .index command was used. When Dickens processes the file, it outputs an array of contents in alphabetic order and stores it with the slot name alphaIndex in bookdata (see Useful Functions, below). A second array is also output with the slot name subIndex which for each letter of the alphabet, an array index into alphaIndex for that letter.
.index Apple Computer
",
styles: [447, s2, 23, s9, 1, s2],
layout: 8192
};
book.contents[122] := c123;
c124 := {
data: " .preamble",
viewFont: s11,
layout: 3
};
book.contents[123] := c124;
c125 := {
data: "Allows text to be output into the dickens output file. The text is placed before any definitions of content. The .endpreamble is optional.
.preamble
book.data.myStuff := specialProto;
.endpreamble
",
styles: [140, s2, 61, s9, 1, s2],
layout: 8192
};
book.contents[124] := c125;
c126 := {
data: " .postamble",
viewFont: s11,
layout: 3
};
book.contents[125] := c126;
c127 := {
data: "Allows text to be output into the dickens output file. The text is placed after all definitions of content and internal book frames. The .endpostamble is optional.
.postamble
book.data.specialContent := c1;
.endpostamble
",
styles: [165, s2, 60, s9, 1, s1],
layout: 8192
};
book.contents[126] := c127;
c128 := {
data: "Flags",
viewFont: s8,
layout: 3,
name: "flags"
};
book.contents[127] := c128;
c129 := {
data: "Flags are used to specify various layout and visual options.
",
viewFont: s2,
layout: 8195
};
book.contents[128] := c129;
c130 := {
data: "Document flags",
viewFont: s13,
layout: 3,
name: "document_flags"
};
book.contents[129] := c130;
c131 := {
data: "NoReLayout",
styles: [10, s11, 1, s2],
layout: 8195
};
book.contents[130] := c131;
c132 := {
data: "Keep everything the same even if screen size changes.",
viewFont: s2,
layout: 8192
};
book.contents[131] := c132;
c133 := {
data: "RightToLeft",
styles: [11, s11, 1, s2],
layout: 3
};
book.contents[132] := c133;
c134 := {
data: "The rightmost column is used before the left for support of languages that run right to left.
",
viewFont: s2,
layout: 8192
};
book.contents[133] := c134;
c135 := {
data: "Content flags",
viewFont: s13,
layout: 3,
name: "content_flags"
};
book.contents[134] := c135;
c136 := {
data: "Main",
styles: [4, s10, 1, s2],
layout: 8195
};
book.contents[135] := c136;
c137 := {
data: "Display in a main column (this is the default).",
viewFont: s2,
layout: 8192
};
book.contents[136] := c137;
c138 := {
data: "Sidebar",
styles: [7, s10, 1, s2],
layout: 3
};
book.contents[137] := c138;
c139 := {
data: "Display in the sidebar column.",
viewFont: s2,
layout: 8192
};
book.contents[138] := c139;
c140 := {
data: "ToEdge",
styles: [6, s10, 1, s2],
layout: 3
};
book.contents[139] := c140;
c141 := {
data: "Spills out (from its column) to the edge of the page.",
viewFont: s2,
layout: 8192
};
book.contents[140] := c141;
c142 := {
data: "Centered",
styles: [8, s10, 1, s2],
layout: 3
};
book.contents[141] := c142;
c143 := {
data: "Centered within column.",
viewFont: s2,
layout: 8192
};
book.contents[142] := c143;
c144 := {
data: "ForceScroll",
styles: [11, s10, 1, s2],
layout: 3
};
book.contents[143] := c144;
c145 := {
data: "Entire page will scroll if Content is large enough.",
viewFont: s2,
layout: 8192
};
book.contents[144] := c145;
c146 := {
data: "NeverBreak",
styles: [10, s10, 1, s2],
layout: 3
};
book.contents[145] := c146;
c147 := {
data: "Avoid splitting text between pages.",
viewFont: s2,
layout: 8192
};
book.contents[146] := c147;
c148 := {
data: "StartsPage",
styles: [10, s10, 1, s2],
layout: 3
};
book.contents[147] := c148;
c149 := {
data: "Always put on top of new page.",
viewFont: s2,
layout: 8192
};
book.contents[148] := c149;
c150 := {
data: "PageBottom",
styles: [10, s10, 1, s2],
layout: 3
};
book.contents[149] := c150;
c151 := {
data: "Always put on the bottom of a page.",
viewFont: s2,
layout: 8192
};
book.contents[150] := c151;
c152 := {
data: "PageMiddle",
styles: [10, s10, 1, s2],
layout: 3
};
book.contents[151] := c152;
c153 := {
data: "Put in the vertical middle of the page.",
viewFont: s2,
layout: 8192
};
book.contents[152] := c153;
c154 := {
data: "WrapAround ",
styles: [10, s10, 2, s2],
layout: 3
};
book.contents[153] := c154;
c155 := {
data: "Used for callout or Illustration",
viewFont: s2,
layout: 8192
};
book.contents[154] := c155;
c156 := {
data: "AlignTop",
styles: [8, s10, 1, s2],
layout: 3
};
book.contents[155] := c156;
c157 := {
data: "Align sidebar with top of previous Content.",
viewFont: s2,
layout: 8192
};
book.contents[156] := c157;
c158 := {
data: "AlignBottom",
styles: [11, s10, 1, s2],
layout: 3
};
book.contents[157] := c158;
c159 := {
data: "Align sidebar with bottom of previous Content.",
viewFont: s2,
layout: 8192
};
book.contents[158] := c159;
c160 := {
data: "AlignCenter",
styles: [11, s10, 1, s2],
layout: 3
};
book.contents[159] := c160;
c161 := {
data: "Align sidebar with center of previous Content.",
viewFont: s2,
layout: 8192
};
book.contents[160] := c161;
c162 := {
data: "BrowserOnly",
styles: [11, s10, 1, s2],
layout: 3
};
book.contents[161] := c162;
c163 := {
data: "Content will not be drawn on the page.",
viewFont: s2,
layout: 8192
};
book.contents[162] := c163;
c164 := {
data: "Overlay",
styles: [7, s10, 1, s2],
layout: 3
};
book.contents[163] := c164;
c165 := {
data: "Overlays previous Content without forcing a wrap",
viewFont: s2,
layout: 8192
};
book.contents[164] := c165;
c166 := {
data: "KeepWith",
styles: [8, s10, 1, s2],
layout: 3
};
book.contents[165] := c166;
c167 := {
data: "Keep this Content with the previous.",
viewFont: s2,
layout: 8192
};
book.contents[166] := c167;
c168 := {
data: "NoTitle",
styles: [7, s10, 1, s2],
layout: 3
};
book.contents[167] := c168;
c169 := {
data: "Layout flag indicating that space should not be reserved for a running title.",
viewFont: s2,
layout: 8192
};
book.contents[168] := c169;
c170 := {
data: "TopEdge",
styles: [7, s10, 1, s2],
layout: 3
};
book.contents[169] := c170;
c171 := {
data: "Draw line above.",
viewFont: s2,
layout: 8192
};
book.contents[170] := c171;
c172 := {
data: "LeftEdge",
styles: [8, s10, 1, s2],
layout: 3
};
book.contents[171] := c172;
c173 := {
data: "Draw line left edge.",
viewFont: s2,
layout: 8192
};
book.contents[172] := c173;
c174 := {
data: "BottomEdge ",
styles: [10, s10, 2, s2],
layout: 3
};
book.contents[173] := c174;
c175 := {
data: "Draw line bottom edge.",
viewFont: s2,
layout: 8192
};
book.contents[174] := c175;
c176 := {
data: "RightEdge",
styles: [9, s10, 1, s2],
layout: 3
};
book.contents[175] := c176;
c177 := {
data: "Draw line right edge.",
viewFont: s2,
layout: 8192
};
book.contents[176] := c177;
c178 := {
data: "Edges",
styles: [5, s10, 1, s2],
layout: 3
};
book.contents[177] := c178;
c179 := {
data: "Draw box around.",
viewFont: s2,
layout: 8192
};
book.contents[178] := c179;
c180 := {
data: "Round",
styles: [5, s10, 1, s2],
layout: 3
};
book.contents[179] := c180;
c181 := {
data: "Corners are rounded.",
viewFont: s2,
layout: 8192
};
book.contents[180] := c181;
c182 := {
data: "Reverse",
styles: [7, s10, 1, s2],
layout: 3
};
book.contents[181] := c182;
c183 := {
data: "Draw white on black.
",
viewFont: s2,
layout: 8192
};
book.contents[182] := c183;
c184 := {
data: "On the same line (but following) any of the above edges commands, the author can set the width of the line to be used with the following command: edgewidth=number
Where number is the width in pixels.
",
viewFont: s2,
layout: 3
};
book.contents[183] := c184;
c185 := {
data: "FullColumn",
styles: [10, s10, 1, s2],
layout: 3
};
book.contents[184] := c185;
c186 := {
data: "Can be added to the invert or any edge command to extend to the full width of the column.",
viewFont: s2,
layout: 8192
};
book.contents[185] := c186;
c187 := {
data: "Kiosk ",
styles: [5, s10, 2, s2],
layout: 3
};
book.contents[186] := c187;
c188 := {
data: "This Page Layout is a kiosk page layout",
viewFont: s2,
layout: 8192
};
book.contents[187] := c188;
c189 := {
data: "NoPage ",
styles: [6, s10, 2, s2],
layout: 3
};
book.contents[188] := c189;
c190 := {
data: "This Content will not display on a page (although might be displayed via a script.)",
viewFont: s2,
layout: 8192
};
book.contents[189] := c190;
c191 := {
data: "NoScroller",
styles: [10, s10, 1, s2],
layout: 3
};
book.contents[190] := c191;
c192 := {
data: "Inhibits a scroll control from appearing in graphics larger than the column.",
viewFont: s2,
layout: 8192
};
book.contents[191] := c192;
c193 := {
data: "HalfBrowser",
styles: [11, s10, 1, s2],
layout: 3
};
book.contents[192] := c193;
c194 := {
data: "Display this subject in a half-width browser column. Note that siblings of this subject should have the flag as well.
",
viewFont: s2,
layout: 8192
};
book.contents[193] := c194;
c195 := {
data: "Book Examples",
viewFont: s8,
name: "examples"
};
book.contents[194] := c195;
c196 := {
data: "Example One",
viewFont: s13,
name: "example_1"
};
book.contents[195] := c196;
c197 := {
data: "This first example shows some of the basic steps in creating a book. The book is defined first followed by layouts, a kiosk page and finally the content.
.# Document Commands
.# First the Book’s title
.title The Planets
.# Next the name we want in the extras drawer
.shorttitle Planets
.author Brad Zeus
.# The ISBN needs to be unique
.isbn ZeusBook1
.date 10/5/93
.publisher Zeus Publishing, Inc.
.copyright (c)1993 Zeus Publishing, Inc.
.# Layout Commands
.# We’re naming the layout: menu. It "&"uses all twelve columns. Note also the kiosk flag.
.layout menu 12 Kiosk
.# Now a second layout with a text header.
.layout full 12
.header
The Planets
.# Kiosk Pages
.# For our book we want to start with a menu of choices of where to go in the book.
.# So we define a kiosk. It’s name is contents and it uses the menu layout.
.kiosk name=Contents layout=menu
.# The text \u201c" & "Earth\u201d" & " when pressed will goto the content named earth
.story goto=earth
Earth
.story goto=mars
Mars
.story goto=jupiter"&"
Jupiter
.endkiosk
.# Content
.# This first subject will be shown in the browser on the first level. It have been given a name so that the goto in the kiosk can find it. We’ve also indicated that we want this content to start a new page.
.# Introduction will appear in the brower only under the subject Earth defined above.
.subject 2 BrowserOnly
Introduction
.story layout=full
Naturally, scientists know"&" more about our beautiful, temperate world than any other in the universes. They are on hand to experiment directly, to interpret the evidence and to draw conclusions.
From the available evidence, planetary scientists are now reasonably certain that at the centre of Earth there is a nickel-iron core. This is divided into two parts: a metallic centre 2.500 kilometres in diameter and, surrounding it, a layer where the iron and nickel are in a liquid state. This liquid section is about 2,200 kilometres thic"&"k.
.# This is the story card text we want popped up when the user taps the Earth picture. Note the NoPage flag.
It’s all done with layout flags (this is the secret to doing almost anything with Newton Book Maker). The idea is to use a 2-column layout, but by frequent use of the toEdge flag, give most Contents the entire width of the page. Leave this flag off on the left column text, and use sidebar and whatever alignment is appropriate on the picture.
.# end of example
After processing by Dickens and NTK here’s the result:",
data: "Do not use viewSetupFormScript at the book or page level. Instead, use viewSetupFormDoneScript, which will be called each time a page is turned to (except when printing).
",
styles: [11, s2, 19, s5, 41, s2, 23, s5, 78, s2],
layout: 8192
};
book.contents[208] := c209;
c210 := {
data: "Reserved Slot Names:",
viewFont: s13,
name: "reserved_names"
};
book.contents[209] := c210;
c211 := {
data: " type
data
related
look
layout
edgewidth
flags
printing
scripts
contentarea
cupage
bookref
browser
curRendering
kioskDest
",
styles: [136, s5, 1, s2],
layout: 8192
};
book.contents[210] := c211;
c212 := {
data: "Dynamic List Browsers",
viewFont: s13,
name: "dynamic_browsers"
};
book.contents[211] := c212;
c213 := {
data: "You can add your own browsers to the Book Reader overview. A typical use might be to display the results of a custom search — the user could keep the browser open and navigate between hits. The structure of a list browser frame is:
Where content is a Content within the book (e.g. returned by :F"&"indContentByValue()). The level slot can be omitted; it defaults to 1. A name slot is the topic’s text in the outline. If this is omitted, the text of the Content will be used (entries for non-text Contents must have a name slot).
If the hilite slot is present in the browser frame, the content (item) is hilighted after turning to its page.
data: "Adds a bookmark at pageNumber for the current book. A book may have only six bookmarks. There’s currently no way for a user to remove a bookmark.
",
styles: [19, s2, 10, s16, 118, s2],
layout: 8192
};
book.contents[215] := c216;
c217 := {
data: "AuthorData ( )",
styles: [11, s10, 4, s5],
layout: 3
};
book.contents[216] := c217;
c218 := {
data: "Returns the ref of a RAM based frame in which book script authors may put data they want stored internal to the Newton. For example, preferences data. This data is maintained even after the book has been removed.
CAUTION: Do not put in this frame any data that is resident in the book itself. Since books might be removed at any time, any copied data could in fact render the entire data frame invalid.
",
styles: [214, s2, 7, s11, 184, s2],
layout: 8192
};
book.contents[217] := c218;
c219 := {
data: "BookData ( )",
styles: [9, s10, 4, s5],
layout: 3
};
book.contents[218] := c219;
c220 := {
data: "Returns the ref of the data frame in which book script authors should put any of their own special data. This data is added at compile time and becomes part of the book itself. Any frames kept here are to be considered read-only at run-time.
The index dot command also puts their alphaIndex and subIndex arrays here.
",
styles: [281, s2, 10, s5, 5, s2, 8, s5, 16, s2],
layout: 8192
};
book.contents[219] := c220;
c221 := {
data: "Bookmarks ( )",
styles: [9, s10, 5, s5],
layout: 3
};
book.contents[220] := c221;
c222 := {
data: "Returns for the current book, an array of bookmarks.
[number, ...]
",
styles: [54, s2, 15, s9, 1, s2],
layout: 8192
};
book.contents[221] := c222;
c223 := {
data: "BookTitle ( )",
styles: [9, s10, 5, s5],
layout: 3
};
book.contents[222] := c223;
c224 := {
data: "Returns the title of the current book.
",
viewFont: s2,
layout: 8192
};
book.contents[223] := c224;
c225 := {
data: "CountPages ( )",
styles: [10, s10, 5, s5],
layout: 3
};
book.contents[224] := c225;
c226 := {
data: "Returns the number in pages of the current book.
",
viewFont: s2,
layout: 8192
};
book.contents[225] := c226;
c227 := {
data: "CurrentPage ( )",
styles: [11, s10, 5, s5],
layout: 3
};
book.contents[226] := c227;
c228 := {
data: "Returns the current page of the current book.
data: "Searches for string in the current book. Scope is the symbol 'localFind if the search should be done in the current book, 'globalFind if in all books. Returns in results an array with an element for each book string was found in. Each element contains the following frame:
data: "FindPageByContent finds the page that the characters of aContent at anOffset can be found on. (Note that Contents are frequently split between pages.)
data: "Shows a window at-and-of aBounds with using the content that has a slot whose symbol is aSymbol and a value of aValue. Content can any type of content including stories and pictures. There can only be one story card displayed at a time. Note that the story card data is found by Book Reader by searching the book for the proper content. Thus, defining story card contents at the beginning of the file will result in faster display.